<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin:0;
            padding: 0;
        }
        .box {
            width:450px;
            height: 200px;
            margin: 10px auto;
            background-color:white;
        }
        .btn {
            display: block;
            margin-left: 5px;
            margin-top: 2px;
            line-height: 30px;
            text-align: center;
            border-radius: 15px;
            border:none;
            outline: none;
            width: 140px;
            height: 30px;
            color: white;
            background-color: #449D44;
        }
        #header {
            width: 100%;
            height: 20%;
            line-height: 40px;
            text-align: center;
        }
        #content {
            width: 100%;
            height: 60%;
        }
        hr {
            border:none
        }
        .btn2 {
            width: 50px;
            height: 25px;
            color: white;
            border-radius: 10px;
            margin-left:380px;
            background: #449D44;
            margin-top:5px;
            display: none;
        }
        #content>input {
            width: 95%;
            height:30px;
            border-radius: 10px;
            margin: 5px 10px;
            display: none;
        }
        a {
            text-decoration: none;
            color: black;
        }
    </style>
    <script src="jquery.min.js"></script>
</head>
<body >
<div id="body">
    <button class="btn" id="btn">点我展示模态框</button>
    <div class="box" id="box">
        <div id="header"></div>
        <hr class="hr">
        <div id="content">
            <input type="text" placeholder="输入姓名" class="input">
            <input type="password" placeholder="输入密码" class="input">
        </div>
        <hr class="hr">
        <div id="footer">
            <button id="btn2" class="btn2">确定</button>
        </div>
    </div>
</div>
<script>
    var btn=$('#btn');
    var body = $('#body');
    var box=$('#box');
    var hr=$("hr");
    var header = $('#header');
    var content = $('#content');
    var footer = $('#footer');
    var btn2 = $('#btn2');
    var input = $('.input');
    btn.click(
        function () {
            box.css({
                'box-shadow': '#222 0px 0px 20px',
                'border-radius':'5px',
            });
            body.css({
                'background-color':'gray',
                'width':'1400px',
                'height':'900px',
            });
            btn.css({
                'background-color':'#224F22',
                'color':'#80807A'
            });
            hr.css({
                'border':'1px solid gray'
            });
            header.html(
                '<h4>这是标题</h4>'
            );

            btn2.css({
                'display':'block',
            });
            input.css(
                'display','block'
            )
        }
    );
    btn2.click(
        function () {
            btn2.html(
                '<a href="按键事件.html">提交</a>'
            )
        }
    )
</script>
</body>
</html>